package com.gec.dao.Impl;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;

import com.gec.dao.GoodTypeDao;
import com.gec.entity.GoodType;

public class GoodTypeDaoImpl extends BaseDaoImpl<GoodType> implements GoodTypeDao {

	@Override
	public void insert(GoodType a) {
		
	}

	@Override
	public int update(GoodType a) {
		return 0;
	}

	@Override
	public int delete(Integer id) {
		return 0;
	}

	@Override
	public GoodType selectById(Integer id) {
		return null;
	}

	@Override
	public List<GoodType> selectAll() {
		return null;
	}

	@Override
	protected GoodType mapper(ResultSet rs) throws SQLException {
		GoodType gt = new GoodType();
		gt.setId(rs.getInt(1));
		gt.setName(rs.getString(2));
		gt.setShop_id(rs.getInt(3));
		return gt;
	}

	@Override
	public List<GoodType> selectByIds(int shopid) {
		return this.execQuery("select * from fs_goodtypes where gtype_shop_id = ?", shopid);
	}

}
